package com.sunlee.common.core.redis;

/**
 * @author sunlee
 */
public class RedisKeys {

    private RedisKeys() {
    }

    private static final String SYS_LOG_KEY = "sys:log";
    private static final String SYS_PARAMS_KEY = "sys:params";
    public static final String SYS_RESOURCE_KEY = "sys:resource";
    public static final String WX_MP_ACCESSTOKEN = "common:wxmp";

    public static final String APP_CATEGORY_LIST_KEY = "common:category:list";

    /**
     * 系统参数Key
     */
    public static String getSysParamsKey() {
        return SYS_PARAMS_KEY;
    }

    /**
     * 验证码Key
     */
    public static String getCaptchaKey(String uuid) {
        return "sys:captcha:" + uuid;
    }

    /**
     * 登录用户Key
     */
    public static String getSecurityUserKey(Long id) {
        return "sys:security:user:" + id;
    }

    /**
     * 系统日志Key
     */
    public static String getSysLogKey() {
        return SYS_LOG_KEY;
    }

    /**
     * 系统资源Key
     */
    public static String getSysResourceKey() {
        return SYS_RESOURCE_KEY;
    }

    /**
     * 用户菜单导航Key
     */
    public static String getUserMenuNavKey(Long userId) {
        return "sys:user:nav:" + userId;
    }

    /**
     * 用户权限标识Key
     */
    public static String getUserPermissionsKey(Long userId) {
        return "sys:user:permissions:" + userId;
    }

    /**
     * 系统参数Key
     */
    public static String getWxMpAccesstoken() {
        return WX_MP_ACCESSTOKEN + ":accessToken";
    }
}
